package ie.dkit.java3Demulation.objects3d;

import ie.dkit.java3Demulation.transforming.Transformable;

import java.util.Collection;
import java.util.Vector;

public class PointGroup3D extends Vector<Point3D> implements Transformable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -3957850984889628738L;

	private String name;
	
	private Point3D m_RotationPoint;

	public void addPoint(Point3D point) {
		add(point);
	}

	public void removePoint(Point3D point) {
		remove(point);
	}

	public void setCoordinates(Point3D point) {
		for (Point3D p : this) {
			p.setCoordinate(point);
		}
	}

	public void addToPoint(double x, double y, double z) {
		for (Point3D p : this) {
			p.setX(p.getX() + x);
			p.setY(p.getY() + y);
			p.setZ(p.getZ() + z);
		}
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Collection<Point3D> getPoints() {
		return this;
	}

	public Point3D getRotationPoint() {
		return m_RotationPoint;
	}

	public void setRotationPoint(Point3D point3D) {
		m_RotationPoint = point3D;
	}
}
